home *** CD-ROM | disk | FTP | other *** search
/ HPAVC / HPAVC CD-ROM.iso / WRIPDM16.ZIP / METAFILE.TXT < prev    next >
Text File  |  1993-08-20  |  5KB  |  93 lines

  1. Importing Windows Metafiles.
  2.  
  3. WinRIP Lite provides a facility which allows images in the form of a Windows 
  4. Metafile to be imported into the current editing window and converted to RIP 
  5. format. This is obviously a very powerful tool to aid you in producing high 
  6. quality images.
  7.  
  8. Before we get started on explaining how to go about import metafiles, there 
  9. are a few points of which you should be aware.
  10.  
  11. Metafiles are made up of Windows GDI drawing commands and mainly consist of 
  12. Polygons, PolyPolygons and PolyLines. PolyPolygons and PolyLines are unknown 
  13. in RIP, a PolyPolygon is a single GDI drawing command containing several 
  14. individual polygons, a PolyLine is also a single drawing command, but 
  15. containing several lines. Also, one problem with RIP is the restriction that a 
  16. polygon may only contain a maximum of 512 points, whereas a polygon GDI 
  17. command may contain thousands of points.
  18.  
  19. Obviously, WinRIP Lite has to provide a means of handling the PolyPolygon and 
  20. PolyLine GDI command conversions. This it does in the following way. A 
  21. PolyPolygon is actually output as a series of individual 'Polygons' in RIP 
  22. format, and PolyLines as individual 'Lines'. Nothing spectacular in this you 
  23. might say, but be warned, this has side effects! A PolyLine contains a series 
  24. of points each of which is connected together, as an example take the 
  25. following set of points to be the coordinates in a Polyline GDI command:-
  26.  
  27.                {(0, 1)(2, 5)(20, 15)(27, 4)(30, 4)}
  28.  
  29. Now this set of points consists of 5 individual point in PolyLine format, but 
  30. consider what happens when this is converted to RIP:
  31.  
  32.                 !|L00010205|L02052015|L20152704|L27043004
  33.  
  34. NOTE: The individual points have not been converted to Mega Number format to 
  35. aid clarity.
  36.  
  37. You get four individual line drawing command in RIP format, each consisting of 
  38. 10 characters (including the '|' character). The start point of the next 
  39. command is the same as the last point of the previous command. in other words 
  40. each point, except the very first and very last is specified TWICE.
  41.  
  42. RIP only allows for a maximum of 512 points to be specified in a Polygon, so 
  43. how does WinRIP Lite cope with the situation where there are more than 512 
  44. points in a GDI Polygon metafile command. Simple, WinRIP Lite converts the 
  45. polygon to a set of individual 'Line' commands along the same lines as the 
  46. example given above and adds an additional line command at the end of the 
  47. sequence to ensure that the polygon is 'closed, that is, that the last point 
  48. in the polygon is connected to the first.
  49.  
  50. Now you can see the potential danger... You can end up with a VERY large RIP 
  51. file. You are therefore advised to keep the number of imported metafiles per 
  52. RIP image to a minimum. You can see the effect of the conversion of two 
  53. metafiles by examining the file 'CHAPLIN.RIP' (included with WinRIP Lite). 
  54. This files contains to elements converted from Windows metafiles, the drawing 
  55. of Charlie Chaplin and the name WinRIP. Only the text "Charlie Chaplin brought 
  56. to you by" was actually entered in WinRIP. The file is almost 21k!
  57.  
  58.  
  59. How to Import a Metafile.
  60.  
  61. From the pull down File menu click 'Import Image', you will be presented with 
  62. a 'File Open' dialog box containing a 'Directory List Box' and 'File List Box' 
  63. etc., from which you can select the file to be imported. Once you have 
  64. selected the file, the image will be displayed in the top left hand corner of 
  65. the screen together with a 'bounding box'. Note that the imported image may be 
  66. larger than the window. You will notice that a window is displayed containing 
  67. eight 'Radio Buttons'. Against each of these button is a scaling factor 
  68. allowing the imported image to be scaled by:
  69.  
  70.                                 25%
  71.                                 50%
  72.                                 75%
  73.                                 100%
  74.                                 150%
  75.                                 200%
  76.                                 250%
  77.                                 300%
  78.  
  79. Select the scaling factor by clicking the appropriate radio button. This does 
  80. not immediately effect the displayed image, but the bounding box will change 
  81. size according to the scale factor selected. All scale factors are applied to 
  82. the size of the original image, i.e. scaling the image by 150% will scale the 
  83. image to 1.5 times it's original size, now if a further scaling factor is 
  84. selected that will be applied to the size of the ORIGNAL image. To accept the 
  85. new image size as defined by the bounding box, click the OK button.
  86.  
  87. The bounding box may now be dragged to position where the image is to be 
  88. pasted. To actually paste the image, click the right hand mouse button.
  89.  
  90.  
  91.  
  92.  
  93.